package com.sdweizan.sdk.bytedance.bean.distribution;

import com.alibaba.fastjson.annotation.JSONField;
import com.sdweizan.sdk.bytedance.bean.BdBaseRequest;
import com.sdweizan.sdk.bytedance.constants.BdConstants;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class BdCreateReturnRequest implements BdBaseRequest {
  @JSONField(name = "app_id")
  private String appId;
  // 商户侧的结算号，与settle_no二选一填写
  @JSONField(name = "out_settle_no")
  private String outSettleNo;
  // 开发者侧的结算号,与out_settle_no二选一填写
  @JSONField(name = "settle_no")
  private String settleNo;
  // 开发者回退单号，相同回退单号小程序平台会进行幂等处理。 只能使用数字、大小写字母_-*。
  @JSONField(name = "out_return_no")
  private String outReturnNo;
  // 回退商户号，即原分账方商户号
  @JSONField(name = "merchant_uid")
  private String merchantUid;
  // 回退金额，单位分
  @JSONField(name = "return_amount")
  private Long returnAmount;
  // 回退描述，长度限制 100 个字符
  @JSONField(name = "return_desc")
  private String returnDesc;
  // 开发者自定义字段，回调原样回传
  @JSONField(name = "cp_extra")
  private String cpExtra;

  @JSONField(name = "sign")
  private String sign;

  @Override
  public String requestUri() {
    return BdConstants.API_HOST + "/api/apps/ecpay/v1/create_return";
  }
}
